<template>
	<div id="">
		<span id="1" style="display: none;">
			{{current.userId}}
		</span>
		{{userId}}
		<a @click="logout" href="javascript:void(0)" :class="'w-100 h-100'">退出登录</a>
	</div>
</template>

<script>
	import store from '../common/store.js'
	export default {
		data() {
			return {
			userId:'',
			currentUser:{},
			}
			
		},
		methods: {
			logout: () => {
				store.commit('loginOut')
			},
		},
		created: function() {
			
		},
		mounted() {
			this.$data.userId = this.$data.currentUser.user.userId
			// window.addEventListener("click", this.search);
		},
		computed: {
			current: function() {
				this.$data.currentUser = store.state.currentUser
				return store.state.currentUser
			},
		},
		
	
	}
</script>

<style>
</style>
